//
//  LotteryRecordModel.m
//  WanCaiC8
//
//  Created by tangang on 2018/4/24.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "LotteryRecordModel.h"

@implementation LotteryRecordModel

- (void)setNum:(NSString *)Num{
    _Num=Num;
    _numArr=[Num componentsSeparatedByString:@","];
    if (_numArr.count>0) {
        NSInteger count=0;
        for (int i=0; i<_numArr.count; i++) {
            [self.PCArr addObject:_numArr[i]];
            count+=[_numArr[i] integerValue];
            [self.PCArr addObject:@"+"];
            [self.PCArr replaceObjectAtIndex:self.PCArr.count-1 withObject:@"="];
            [self.PCArr addObject:[NSString stringWithFormat:@"%ld",count]];
        }
        
    }
}

- (void)setSubTime:(NSString *)SubTime{
    NSArray *str=[SubTime componentsSeparatedByString:@"."];
    if (str.count>0) {
        SubTime=str[0];
    }
    str=[SubTime componentsSeparatedByString:@"+"];
    if (str.count>0) {
        SubTime=str[0];
    }
    NSDate *date=[TGTools dateFormatter:@"yyyy-MM-dd'T'HH:mm:ss" andString:SubTime];
    _SubTime=[TGTools dateFormatter:@"yyyy年MM月dd日 HH:mm" andDate:date];
//    _SubTime = [[TGToolForDateFormatter shareInstance] userVisibleDateTimeStringForRFC3339DateTimeString:SubTime];
    
    
}

- (void)setShowInfo:(NSString *)ShowInfo{
    _ShowInfo=ShowInfo;
    _infoArr=[ShowInfo componentsSeparatedByString:@","];
}

- (NSMutableArray *)PCArr{
    if (!_PCArr) {
        _PCArr=[[NSMutableArray alloc]init];
    }
    return _PCArr;
}

@end
